<?php
/**
 * View AJAX - ASSOCIA ARTISTI A LIVE LaFabbrica.org
 * 
 * @author     luigi.pastore (gigi@la-fabbrica.org)
 * @created    17-mag-2011
 * @package    LaFabbrica
 * @copyright  Copyright (c) 2011 Luigi Pastore
 */

if( count( $this->artists ) ):
    foreach( $this->artists['main'] AS $artist ) : ?>
    <tr class="unselectable" id="artist_<?php echo $artist['artist_id'] ?>">
    	<th>
	    <span><?php echo $artist['artist_name'] ?></span>
    	</th>
        <td>
            <ul>
                <li class="complex">
		    <input type="hidden" name="artists[]" id="artists" value="<?php echo $artist['artist_id'] ?>" />
		    <input class="field checkbox" name="artist_<?php echo $artist['artist_id'] ?>" id="artist_<?php echo $artist['artist_id'] ?>" type="checkbox" value="openingact" />
		    <label class="choice" for="artist_<?php echo $artist['artist_id'] ?>">Opening Act</label>
                </li>		
            </ul>
        </td>
    	<td title="Operazioni">
    	    <span class="actions">
		<a class="del" id="unlink-artist-<?php echo $artist['artist_id']?>" href="#">
                    &nbsp;
                </a>
    	    </span>
    	</td>
    </tr>
    <?php endforeach;
    if( count( $this->artists['openingact'] ) ):
            foreach( $this->artists['openingact'] AS $artist ) : ?>
            <tr class="unselectable" id="artist_<?php echo $artist['artist_id'] ?>">
                <th>
                    <span><?php echo $artist['artist_name'] ?></span>
                </th>
                <td>
                    <ul>
                        <li class="complex">
                            <input type="hidden" name="artists[]" id="artists" value="<?php echo $artist['artist_id'] ?>" />
                            <input class="field checkbox" name="artist_<?php echo $artist['artist_id'] ?>" id="artist_<?php echo $artist['artist_id'] ?>" type="checkbox" value="openingact" checked="checked" />
                            <label class="choice" for="artist_<?php echo $artist['artist_id'] ?>">Opening Act</label>
                        </li>		
                    </ul>
                </td>
                <td title="Operazioni">
                    <span class="actions">
                        <a class="del" id="unlink-artist-<?php echo $artist['artist_id']?>" href="#">
                            &nbsp;
                        </a>
                    </span>
                </td>
            </tr>
            <?php endforeach;
    endif;
else:
    ?><tr class="result"><td colspan="5">Nessun elemento presente...</td></tr> <?php	
endif;?>